package service.sgbelongsTo;

import dao.SGBelongsToDAO;
import dao.RecordDuplicateException;
import relations.SGBelongsTo;


public class SGBelongsToServiceInMemory implements SGBelongsToService {

	public SGBelongsToServiceInMemory(){
		
	}
	
	public static SGBelongsToService newInstance(){
		return new SGBelongsToServiceInMemory();
	}
	
	/**
	 * Finds a Album based on the Album id.
	 * @param userid - user id
	 * @return the instance of the Album
	 */
	public SGBelongsTo findSGBelongsTo(Long group_id, Long single_id){
		SGBelongsToDAO db = SGBelongsToDAO.getInstance();
		SGBelongsTo result = null;
		result = db.findSGBelongsTo(group_id, single_id);
		return result;
	}
	
	
	/**
	 * Adds a new Album to the system.
	 * @param obj - the Album instance to add
	 */
	
	public void addSGBelongsTo(SGBelongsTo obj) throws RecordDuplicateException{
		SGBelongsToDAO db = SGBelongsToDAO.getInstance();	
		db.addSGBelongsTo(obj);
		return;
	}





}
